package de.tum.beilmeiner.template;

import com.google.gwt.core.client.EntryPoint;
import com.google.gwt.user.client.ui.Button;
import com.google.gwt.user.client.ui.Label;
import com.google.gwt.user.client.ui.RootPanel;
import com.google.gwt.user.client.ui.ListBox;
import com.google.gwt.user.client.ui.SplitLayoutPanel;
import com.google.gwt.user.client.ui.RichTextArea;
import com.google.gwt.user.client.ui.TabPanel;

/**
 * Entry point classes define <code>onModuleLoad()</code>.
 */
public class GuiTemplateContactListWindow implements EntryPoint {

	public void onModuleLoad() {
		final Label errorLabel = new Label();
		errorLabel.setText("Hier koennte ihr Error stehen ;)");

		// Add the nameField and sendButton to the RootPanel
		// Use RootPanel.get() to get the entire body element
		RootPanel rootPanel = RootPanel.get("nameFieldContainer");
		RootPanel.get("errorLabelContainer").add(errorLabel, 10, 336);
		errorLabel.setSize("340px", "15");
		
		ListBox listBox = new ListBox();
		rootPanel.add(listBox, 354, 10);
		listBox.setSize("86px", "227px");
		listBox.addItem("User1 ");
		listBox.addItem("User2");
		listBox.addItem("User3");
		listBox.addItem("User4");
		listBox.addItem("User5");
		listBox.addItem("User6");
		listBox.addItem("User7");
		listBox.addItem("User8");
		listBox.addItem("User9");
		listBox.addItem("User10");
		listBox.addItem("User11");
		listBox.addItem("User12");
		listBox.setVisibleItemCount(10);
		
		Button btnLogout = new Button("Logout");
		rootPanel.add(btnLogout, 385, 315);
		btnLogout.setText("Logout");
		
		Button btnSend = new Button("Send");
		rootPanel.add(btnSend, 385, 243);
		btnSend.setSize("55px", "30px");
		
		TabPanel tabPanel = new TabPanel();
		tabPanel.setAnimationEnabled(true);
		rootPanel.add(tabPanel, 10, 10);
		tabPanel.setSize("338px", "299px");
		
		SplitLayoutPanel splitLayoutPanel = new SplitLayoutPanel();
		tabPanel.add(splitLayoutPanel, "State-Monitor", false);
		splitLayoutPanel.setSize("100%", "280px");
		
		RichTextArea HistoryArea = new RichTextArea();
		splitLayoutPanel.add(HistoryArea);
		HistoryArea.setSize("100%", "100%");
		HistoryArea.setText("Your Login was sucessfully.\r\n\r\n\r\nNow choose a Chatroom or a Buddy from the Contactlist.");
		
		Button btnKilltab = new Button("KillTab");
		rootPanel.add(btnKilltab, 384, 279);

		
	}
}
